<template>
  <div>
    <el-pagination
        :class="{pageTopLevel1: topLevel === 1, pageTopLevel2: topLevel === 2, pageTopLevel3: topLevel === 3, pageTopDefault: topLevel === -1}"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-sizes="[10, 20, 30, 40]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total">
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: "PageC",
  data() {
    return {
    }
  },
  props: {
    topLevel: {
      required: false,
      default: -1,
      type: Number
    },
    total: {
      type: Number,
      require: true
    },
    currentPage: {
      type: Number,
      require: true
    },
    pageSize: {
      type: Number,
      require: true
    },
    handleSizeChange: {
      type: Function,
      require: true
    },
    handleCurrentChange: {
      type: Function,
      require: true
    }
  },
  methods: {
    // handleSizeChange(val) {
    //   console.log(`每页 ${val} 条`);
    // },
    // handleCurrentChange(val) {
    //   console.log(`当前页: ${val}`);
    //}
  }
}
</script>

<style scoped>

</style>
